﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PersonaLibrary.Commands.EditCommands
{
    public class DeleteJob : CommandBase
    {
        public override bool CanExecute(object parameter)
        {
            return parameter is int;
        }

        public override void Execute(object parameter)
        {
            DataModel.JobRepository jobRep = (DataModel.JobRepository)DataModel.DataBase.GetRepository<DataModel.JobRepository, DataModel.JobEntity>();
            jobRep.Delete((int)parameter);
        }
    }
}
